import jinja2
import os 

env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath='../templates'))
def RenderToFile(templateName,outputPath):
	print('Rendering',filename)
	renderResult = env.get_template(templateName).render()
	with open(outputPath,'w') as f:
		f.write(renderResult)
		
renderList = []
with open('../templates/render.list') as f:
	renderList = list(map( lambda s: s.strip() , f.readlines() ))
	
for filename in renderList:
	RenderToFile(filename,os.path.join(os.path.abspath('../'),filename))
